﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace QYmall.Core.Model.Models
{
    /// <summary>
    /// 商品标签关联
    /// </summary>
    public class ShopLabelGoodsRelation
    {
        /// <summary>
        /// 自增ID
        /// </summary>
        [Display(Name = "自增ID")]
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public long Id { get; set; }

        /// <summary>
        /// 所属商品ID
        /// </summary>
        [Display(Name = "所属商品")]
        [ForeignKey("ShopGoods")]
        public long GoodsId { get; set; }

        /// <summary>
        /// 所属标签ID
        /// </summary>
        [Display(Name = "所属标签")]
        [ForeignKey("ShopLabel")]
        public int LabelId { get; set; }

        /// <summary>
        /// 商品信息
        /// </summary>
        public ShopGoods? ShopGoods { get; set; }

        /// <summary>
        /// 标签信息
        /// </summary>
        public ShopLabel? ShopLabel { get; set; }
    }
}
